﻿using Ecommerce.Domain.User;
using Ecommerce.Repository;
using Ecommerce.Repository.Interface.User;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Ecommerce.Repository.Impl.Use
{
    public class AccopuntRepository : BaseRepository<Account>, IAccountRepository
    {
        public AccopuntRepository(EFContext context) : base(context)
        {
        }
        public async Task<int> AddAsync(Account account)
        {
            account.Address = account.Address;
            account.Tid = account.Tid;
            account.Rid = account.Rid;
            account.UserName = account.UserName;
            account.UseSex = account.UseSex;
            return await base.AddAsync(account);
        }

        public async Task<List<Account>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }

        public async Task<List<Account>> GetAsync(Expression<Func<Account, bool>> expre)
        {
            return await base.GetAsync(expre);
        }

        public async Task<Account> GetModelAsync(int Id)
        {
            return await base.GetModelAsync(Id);
        }

        public async Task<int> Update(Account user)
        {
            return await base.Update(user);
        }
    }
}